package Demo1;

import Demo1.Animal;
import Demo1.Bird;
import Demo1.Dog;

public class Test {
    public static void main(String[] args) {
       Dog dog=new Dog("wangwang",8);
       func(dog);
       Bird bird=new Bird("niao",8);
       func(bird);
    }
    public static void func(Animal animal){
        animal.eat();
    }
}
